package com.oocl.euc.service.impl;
//package service.impl;
//
//import java.util.List;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//import org.springframework.transaction.annotation.Transactional;
//
//import dao.StudentDao;
//import entity.Student;
//import service.StudentService;
//
//@Service("studentService")
//@Transactional
//public class StudenServiceImpl implements StudentService {
//	@Autowired
//	private StudentDao sd;
//	@Override
//	public Integer registerStudent(Student s) {
//		return sd.addStudent(s);
//	}
//
//	@Override
//	public String avoidDoubleName(String name) {
//		List<Student> students=sd.findAllStudent();
//		for(Student s:students){
//			if(s.getName().equals(name)){
//				return "exist";
//			}
//		}
//		return "doNotExist";
//	}
//
//	@Override
//	public Student loginStudent(String name, String password) {
//		List<Student> students=sd.findAllStudent();
//		for(Student s:students){
//			if(s.getName().equals(name)&&s.getPassword().equals(password)){
//				return s;
//			}
//		}
//		return null;
//	}
//
//}
